import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/views/Layout'
import Find from '@/views/Find'
import Help from '@/views/Help'
import Index from '@/views/Index'
import My from '@/views/My'
import MoreInfo from '@/views/MoreInfo'
import Register from '@/views/Register'
import Login from '@/views/Login'
import CityList from '@/views/CityList'
Vue.use(VueRouter)
const router = new VueRouter({
  routes: [

    { path: '/', redirect: 'Layout' },
    {
      path: '/Layout',
      component: Layout,
      redirect: '/index',
      children: [
        { path: '/find', component: Find },
        { path: '/help', component: Help },
        { path: '/index', component: Index },
        { path: '/my', component: My }
      ]
    },

    { path: '/moreinfo/:id', component: MoreInfo },
    { path: '/register/', component: Register },
    { path: '/login/', component: Login },
    { path: '/citylist/', component: CityList }
  ],
  linkActiveClass: 'active',
  mode: 'history'
})
export default router
